<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

  <style>
    p{
      color: yellow;
    }
  </style>

  <link rel="stylesheet" href="css/test.css">
</head>
<body>

<p >xixi</p>

<script>
  console.log('script start');

  setTimeout(function() {
    console.log('setTimeout');
  }, 0);

  Promise.resolve().then(function() {
    console.log('promise1');
  }).then(function() {
    console.log('promise2');
  });
  console.log('script end');
  /*window.onload = function () {
    var obj = {
      name: 1
    }
    var obj1 = {}

    Object.defineProperty(obj1, 'a', {
      get() {
        return obj['a']
      },
      set(newValue) {
        console.log('=====')
        obj['a'] = newValue
      }
    })

    obj1.a = 'name'

    console.log(obj1,obj)
  }*/
</script>

</body>
</html>
